package com.design.visitor;

import lombok.extern.slf4j.Slf4j;

/**
 * 校长视角
 * @author ytj
 * @date 2024/11/28 13:37
 */
@Slf4j
public class PrincipalVisitor implements Visitor{
    @Override
    public void visitor(Student student) {
        log.info("校长视角学生信息,name:{},class:{},identity:{}",student.getName(),student.getClassName(),student.getIdentity());
    }

    @Override
    public void visitor(Teacher teacher) {
        log.info("校长视角教师信息,name:{},class:{},identity:{},entere:{}",teacher.getName(),teacher.getClassName(),teacher.getIdentity(),teacher.entere());
    }
}
